/*=============== 字体 ===============*/
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Philosopher&display=swap');

/*=============== css变量 ===============*/
:root {
  --header-height: 3.5rem;

  /*========== 颜色 ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(2, 100%, 61%);
  --first-color-alt: hsl(2, 89%, 53%);
  --title-color: hsl(233, 20%, 15%);
  --text-color: hsl(233, 4%, 35%);
  --body-color: hsl(2, 100%, 97%);

  /*========== 字体和排版 ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: 'Open Sans', sans-serif;
  --second-font: 'Philosopher', sans-serif;
  --biggest-font-size: 2.25rem;
  --medium-font-size: 1.8rem;
  --normal-font-size: .938rem;
}

/* 响应式排版 */
@media screen and (min-width: 1024px) {
  :root {
    --biggest-font-size: 3.5rem;
    --normal-font-size: 1rem;
  }
}

/*=============== 基础css ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== 可重用的CSS类 ===============*/
.container {
  max-width: 1024px;
  margin-right: 1.5rem;
  margin-left: 1.5rem;
}

.main {
  overflow: hidden;
  /* For the animations */
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--second-font);
  color: var(--first-color);
  font-size: var(--medium-font-size);
}

.nav-logo span {
  color: var(--title-color);
}

.nav-toggle {
  display: inline-flex;
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
}

@media(max-width: 767px) {
  .nav-menu {
    position: fixed;
    background-color: var(--body-color);
    left: 0;
    top: -100%;
    box-shadow: 0 8px 24px hsla(2, 100%, 35%, .2);
    width: 100%;
    padding: 3.5rem 0 3rem;
    border-radius: 0 0 2rem 2rem;
    transition: top .4s;
  }
}

.nav-list {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 2rem;
}

.nav-link,
.nav-close {
  color: var(--title-color)
}

.nav-link {
  font-weight: 600;
  transition: color .4s;
}

.nav-link:hover {
  color: var(--first-color);
}

.nav-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  cursor: pointer;
  font-size: 1.5rem;
}

.nav-img {
  width: 100px;
  position: absolute;
  top: -.75rem;
  left: 1.5rem;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Active link */
.active-link {
  color: var(--first-color)
}

/*=============== HOME ===============*/
.home,
.home-container {
  position: relative;
}

.home-container {
  padding-top: 3.5rem;
  height: 100vh;
  display: grid;
  row-gap: 1rem;
}

.home-title {
  font-size: var(--biggest-font-size);
  color: var(--title-color);
  font-family: var(--second-font);
  margin-bottom: .75rem;
}

.home-title span {
  display: block;
  color: var(--first-color);
}

.home-description,
.home-button {
  font-weight: 600;
}

.home-description {
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

.home-button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 1.5rem .25rem;
  box-shadow: 0 8px 24px hsla(2, 100%, 45%, .28);
  transition: background .4s;
  cursor: pointer;
}

.home-button:hover {
  background-color: var(--first-color-alt);
}

.home-images {
  position: relative;
  width: 325px;
  height: 378px;
  justify-self: center;
}

.home-images img {
  position: absolute;
}

.home-liquid {
  max-width: initial;
  width: 340px;
  left: -.5rem;
}

.home-juice {
  width: 140px;
  transform: rotate(15deg);
  left: 1rem;
  right: 0;
  top: 1rem;
  /* 居中 */
  margin: 0 auto;
  animation: float-juice 4s ease-in-out infinite;
}

.home-apple2 {
  width: 90px;
  right: 1.5rem;
  bottom: 3.5rem;
}

.home-apple1 {
  width: 100px;
  transform: rotate(-25deg);
  top: 7rem;
  left: .65rem;
}

.home-leaf:nth-child(1),
.home-leaf:nth-child(6) {
  width: 50px;
  transform: rotate(30deg);
}

.home-leaf:nth-child(2),
.home-leaf:nth-child(4),
.home-leaf:nth-child(5) {
  width: 40px;
}

.home-leaf:nth-child(1) {
  top: -7rem;
  right: 3rem;
}

.home-leaf:nth-child(2) {
  transform: rotate(-60deg);
  top: 1.5rem;
  left: 1.25rem;
}

.home-leaf:nth-child(3) {
  width: 20px;
  transform: rotate(-15deg);
  top: 8rem;
  right: 5rem;
}

.home-leaf:nth-child(4) {
  bottom: 4rem;
  left: 3rem;
}

.home-leaf:nth-child(5) {
  transform: rotate(-30deg);
  bottom: 0;
  right: 5rem;
}

.home-leaf:nth-child(6) {
  bottom: -5rem;
  left: 3rem;
}

.home-shape-small,
.home-shape-big {
  background-color: hsla(2, 100%, 88%);
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.home-shape-small {
  width: 200px;
  height: 200px;
  top: -5rem;
  left: -5rem;
}

.home-shape-big {
  width: 250px;
  height: 250px;
  top: 17rem;
  right: -8rem;
}

.home-shape-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: soft-light;
}


/* Move sheets into position */


/* Animation juice */
@keyframes float-juice {
  0% {
    transform: translateY(0) rotate(15deg);
  }

  50% {
    transform: translateY(-1.5rem) rotate(15deg);
  }

  100% {
    transform: translateY(0) rotate(15deg);
  }
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 330px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .home-images {
    width: 245px;
    height: 320px;
  }

  .home-liquid {
    width: 250px;
    left: 0;
  }

  .home-juice {
    width: 100px;
  }

  .home-apple1,
  .homo-apple2 {
    width: 70px;
  }
}

/* For medium devices */
@media screen and (min-width: 767px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .nav-toggle,
  .nav-close,
  .nav-img {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    column-gap: 3rem;
  }

  .home-container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    column-gap: 4rem;
    padding-top: 4rem;
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .home-images {
    width: 530px;
    height: 490px;
  }

  .home-liquid {
    width: 530px;
  }

  .home-juice {
    width: 220px;
    left: 0;
    top: 1.5rem;
  }

  .home-apple1 {
    width: 180px;
    top: 10rem;
    left: -1rem;
  }

  .home-apple1 {
    width: 185px;
    right: 0.5rem;
    bottom: 5.5rem;
  }


  .home-leaf:nth-child(1),
  .home-leaf:nth-child(6) {
    width: 70px;
  }

  .home-leaf:nth-child(2),
  .home-leaf:nth-child(4),
  .home-leaf:nth-child(5) {
    width: 60px;
  }

  .home-leaf:nth-child(1) {
    top: -1rem;
    right: 2rem;
  }

  .home-leaf:nth-child(2) {
    top: 2.5rem;
    left: 2.25rem;
  }

  .home-leaf:nth-child(3) {
    width: 40px;
    top: 12rem;
    right: 10rem;
  }

  .home-leaf:nth-child(4) {
    bottom: 2rem;
    left: 4.5rem;
  }

  .home-leaf:nth-child(5) {
    right: 10rem;
  }

  .home-leaf:nth-child(6) {
    bottom: 1rem;
    left: -8rem;
  }

  .home-shape-small {
    width: 400px;
    height: 400px;
    top: 0;
    left: -15rem;
  }

  .home-shape-big {
    width: 500px;
    height: 500px;
    top: 22rem;
    right: -14rem;
  }
}

@media screen and (min-width: 1048px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
}